package com.daumcorp.searchdata.service.internal;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.daumcorp.searchdata.domain.Book;
import com.daumcorp.searchdata.repository.BookMapper;
import com.daumcorp.searchdata.service.BookService;

@Service
public class BookServiceImpl implements BookService{
	@Autowired
	private BookMapper bookMapper;
	
	@Override
	public Book findBookByIsbn(String isbn) {
		return bookMapper.selectBookByIsbn(isbn);
	}

	@Override
	public List<Book> findAllBook() {
		return bookMapper.selectAllBook();
	}

	@Override
	public void saveBook(Book book) {
		System.out.println(book.getIsbn());
		bookMapper.insertBook(book);
	}
}